package org.delphy.indy2.containers.carbonPanelClasses
{
	import flash.events.MouseEvent;
	import flash.filters.GlowFilter;
	
	import mx.containers.Canvas;

	public class CarbonBorder extends Canvas
	{
		
		public function get weight():Number{
			return getStyle("weight");
		}
		
		public function get cornerRadius():Number{
			return getStyle("cornerRadius");
		}
		 				
		// Filters
		private var innerGlowFilter:GlowFilter;
		private var outterGlowFilter:GlowFilter;
		
		public function CarbonBorder()
		{
			super();
			
			innerGlowFilter=new GlowFilter();
			outterGlowFilter=new GlowFilter();
		}
				
		public function showHilight():void{
			filters=[innerGlowFilter,outterGlowFilter];
		}
		
		public function hideHilight():void{
			filters=[];	
		}
		
		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
			super.updateDisplayList(unscaledWidth,unscaledHeight);
			
			innerGlowFilter.alpha=getStyle("innerGlowAlpha");
			innerGlowFilter.blurX=getStyle("innerGlowSize");
			innerGlowFilter.blurY=getStyle("innerGlowSize");
			innerGlowFilter.inner=true;
			innerGlowFilter.color=getStyle("innerGlowColor");
			
			outterGlowFilter.alpha=getStyle("outterGlowAlpha");
			outterGlowFilter.blurX=getStyle("outterGlowSize");
			outterGlowFilter.blurY=getStyle("outterGlowSize");
			outterGlowFilter.inner=false;
			outterGlowFilter.color=getStyle("outterGlowColor");			
		}
		
	}
}